09-Use of Boolean Variables.py


Sign up Free. Don't forget to check out our challenges, lessons, solve and learn series and more ...


Code Snippet

#Boolean expressions simply result in a value of either True or False
# Worth noting that Python stores true as integer 1, and false as integer 0
# but outputs 'true' or 'false' from print statements
print (7 > 10)
print (4 < 16)
print (4 == 4)
print (4 <= 4)
print (4 >= 4)
print (4 != 4)                    

Try it yourself